--https://www.mdeditor.tw/pl/gki1
local btn = CreateFrame("Button", "sampBtn_smpBtn", UIParent, "UIPanelButtonTemplate")
btn:SetPoint("TOPLEFT", UIParent, "TOPRIGHT", -400, -160)
btn:SetWidth(120)
btn:SetHeight(22)
btn:SetText("请点击我")

local toggleShow = false
local mxILV = 37
local loopMiner = 69000


local function sBtnOnClick(self, button, down)
	local j, k = UnitName("player")
	print("你好" .. j)
	local cnt = 0
	
	print("loop start @" .. loopMiner)
	for n = loopMiner, loopMiner + 1500 do
		--print("n=" .. n)
		local itm, itmLink, _, iLev = GetItemInfo(n)
		if itm and iLev and iLev > mxILV then
			mxILV = iLev
			DEFAULT_CHAT_FRAME:AddMessage("higher id=" .. n .. ", iLev:" .. mxILV .. "  \124cffa335ee\124Hitem:" .. n .. "::::::::60::::1:6806:\124h[" .. itm .. "]\124h\124r");
		end
	end
	loopMiner = loopMiner + 1500
	print("loop end")
end

function kkkkkkkkk1()
	if toggleShow then
		DecursiveDebuggingFrame111:Show()
		Frame111:Show()		
	else
		Frame111:Hide()
		DecursiveDebuggingFrame111:Hide()
	end
	toggleShow = not toggleShow
	
	for i = 1, 15 do
		local command, key1, key2 = GetBinding(i);
		if command then
			local str = string.format("%d. %s:", i, command)
			if (key1) then str = str .. key1 .. " "; end
			if (key2) then str = str .. key2; end
			--DEFAULT_CHAT_FRAME:AddMessage(str,1.0,1.0,1.0);
		end
	end
end

btn:SetScript("OnClick", sBtnOnClick)
btn:Show()
print("sampBtn load done.")
